<?php

namespace Wantuch\SurveyBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="referenced_values")
 */
class ReferencedValue
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="string", length=100)
     */
    protected $name;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $createdAt;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $updatedAt;
    
    /**
     * @ORM\ManyToOne(targetEntity="Survey", inversedBy="referenced_values")
     * @ORM\JoinColumn(name="survey_id", referencedColumnName="id", nullable=true)
     **/
    private $survey;
    
    /**
     * @ORM\Column(type="float",nullable=true)
     */
    protected $refValue;
    
    /**
     * @ORM\Column(type="text", nullable=true)
     */
    protected $imageurl;

    

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return ReferencedValue
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return ReferencedValue
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return ReferencedValue
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime 
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set refValue
     *
     * @param float $refValue
     * @return ReferencedValue
     */
    public function setRefValue($refValue)
    {
        $this->refValue = $refValue;

        return $this;
    }

    /**
     * Get refValue
     *
     * @return float 
     */
    public function getRefValue()
    {
        return $this->refValue;
    }

    /**
     * Set imageurl
     *
     * @param string $imageurl
     * @return ReferencedValue
     */
    public function setImageurl($imageurl)
    {
        $this->imageurl = $imageurl;

        return $this;
    }

    /**
     * Get imageurl
     *
     * @return string 
     */
    public function getImageurl()
    {
        return $this->imageurl;
    }

    /**
     * Set survey
     *
     * @param \Wantuch\SurveyBundle\Entity\Survey $survey
     * @return ReferencedValue
     */
    public function setSurvey(\Wantuch\SurveyBundle\Entity\Survey $survey = null)
    {
        $this->survey = $survey;

        return $this;
    }

    /**
     * Get survey
     *
     * @return \Wantuch\SurveyBundle\Entity\Survey 
     */
    public function getSurvey()
    {
        return $this->survey;
    }
}
